//
//  SuperView.m
//  Restaurant
//
//  Created by wanghuan on 15/4/22.
//  Copyright (c) 2015年 wanghuan. All rights reserved.
//

#import "SuperView.h"

@implementation SuperView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

+(SuperView *)defaultView {

    static SuperView *superView = nil;
    
    @synchronized(self) {
    
        if(!superView) {
            
            superView = [[SuperView alloc]init];
            
        }

    
    }
    return superView;


}

- (UIView *)addView:(UIView *)view borderColor:(UIColor *)color cornerRadius:(CGFloat)cornerRadius borderWidth:(CGFloat)borderWidth {


    view.layer.cornerRadius = cornerRadius;
    
    view.layer.borderColor = [color CGColor];
    
    view.layer.borderWidth = borderWidth;

    return view;

}



@end
